Image processing apparatus for detecting an image using object recognition

ABSTRACT

In an image processing apparatus, minimum width and height and maximum width and height of an object to be detected are calculated on the basis of photographing conditions, an object detection range and a size of the object to be detected and an image reduction coefficient is set on the basis of the calculated minimum width and height and maximum width and heights whereby detection can be achieved while keeping the detection accuracy of image processing intact and an intruding person can be detected at a high speed at a necessarily lowest processing speed.

INCORPORATION BY REFERENCE

The present application claims priority from Japanese applicationJP2007-286086 filed on Nov. 2, 2007, the content of which is herebyincorporated by reference into this application.

BACKGROUND OF THE INVENTION

The present invention relates to a monitor system and more particularly,to an image processing apparatus based on an image process forrecognizing an object present inside a monitor area.

In a conventional video monitor apparatus, the inside of a monitor areawas photographed at predetermined intervals with an image pickup unitsuch as a TV (television) camera and an acquired image is analyzedthrough image processing to recognize an object.

For example, in JP-A-2005-057743, an image obtained by photographing theinside of a monitor area is compared with a background image registeredin advance to thereby recognize and detect an object and thereafter thedetected object is pursued through a template matching method.

Also, in JP-A-2005-012548, with a view to decreasing the load imposed onan operation process as far as possible in a motion detection process, ageneral-use hardware engine for image reduction used for the purpose ofgenerating an image for thumb nail display in, for example, a digitalcamera is utilized so that image data may be reduced and then an imageprocess may be conducted.

In JP-A-2005-057743 mentioned as above, the background image and theinput image are processed while keeping their sizes intact and so a slowprocessing speed results. More particularly, if a CPU (centralprocessing unit) of low processing speed is used or if the number ofpixels per frame is large and the number of pieces of data to beprocessed is large as in the case of, for example, a mega-pixel camera,the image processing cannot be carried out on real time base, thusleading to the possibility that missing of detection and erroneousdetection will occur.

In case the number of pieces of data to be processed is decreased byreducing (thinning out) an image so as to relatively raise theprocessing speed, the image needs to be reduced simply. For example,when the distance from the camera is considered, an image picked up bythe camera nears at the lower side of the screen and it goes away as itapproaches the upper side of the screen. Accordingly, when consideringthe size of the object by the number of pixels, the object that existsin the position near from the camera has a larger pixels, and the sameobject that exists in the position far from the camera has a smallerpixels.

Since the image processing is executed in a unit of pixel (one pixelcorresponding to one data piece), the result of processing becomesaccurate as the number of pixels increases but the processing speed islow whereas the processing speed is fast as the number of pixelsdecreases but the accuracy of the processing result will be impaired.Especially, when many people come into the monitor area or a personcoming thereinto is photographed in a large size, a decrease in theprocessing speed and a deterioration in the detection capability willresult.

Accordingly, in order to execute the image processing accurately, theratio of reduction of an image (reduction coefficient) needs to bechanged appropriately in accordance with conditions of cameraphotography. In other words, in order for the image processing to becarried out constantly at appropriate reduction coefficients, thereduction coefficients need to be determined one by one by the userwhile changing the set value slightly and the reduction coefficientcannot be fixed. Therefore, an appropriate reduction coefficient must becomputed in accordance with a monitoring location and a large processingamount is again generated.

SUMMARY OF THE INVENTION

The present invention contemplates elimination of the aforementionedproblems and it is an object of this invention to provide objectdetection method and image monitoring apparatus which can execute theprocessing on real time base and can prevent missing of detection anderroneous detection. More specifically, the present invention intends toprovide an image processing apparatus in which the set value can bechanged automatically to an appropriate image reduction coefficientwithout increasing extensively the amount of image processing and anobject can be detected even in an environment where the size of theobject changes largely between the frontal side and the depth side.

To accomplish the above object, according to the present invention, animage processing apparatus for detecting through an image process aninput image inputted from a camera adapted to photograph the inside of amonitor area and monitoring the inside of the monitor area by using anobject recognition method, comprises means for reducing the input imageand a background image at a predetermined reduction coefficient toprepare a reduced input image and a reduced background image, means forperforming a differential process between the reduced input image andthe reduced background image to prepare a difference image, means forbinary-coding the difference image to prepare a monochrome image, andmeans for recognizing an object from the monochrome image.

An image processing apparatus according to this invention comprisesmeans for inputting set-up information of the camera, an objectdetection range inside the monitor area and a real size of an objectdesired to be detected, and means for selecting a point at which thesize of the object desired to be detected is minimized inside the objectdetection range on the basis of the inputted set-up information of thecamera, object detection range inside the monitor area and real size ofthe object desired to be detected and calculating the reductioncoefficient from a lump of pixels of the object at the selected minimumpoint.

According to the present invention, object detection method and imageprocessing apparatus can be provided which can change the set valuelittle by little so as to set the image reduction coefficient to anappropriate value without increasing the amount of work extensively andcan detect an object even under an environment where the size of theobject changes extensively between the frontal side and the depth side.In other words, the image reduction coefficient can be set automaticallyto the appropriate value in accordance with the installation environmentand therefore, high-speed processing can be achieved while keeping thedetection accuracy intact.

Other objects, features and advantages of the invention will becomeapparent from the following description of the embodiments of theinvention taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the construction of an embodiment of avideo monitoring apparatus according to the present invention.

FIG. 2 is a flowchart for explaining procedural operations in an objectdetection method according to the invention.

FIG. 3 is a schematic diagram for explaining the principle of the objectdetection method according to the invention.

FIG. 4 is a diagram for explaining in side view form an embodiment of amethod of setting camera set-up conditions according to the invention.

FIG. 5 is a diagram for explaining in plan view form the embodiment ofthe method of setting camera set-up conditions according to theinvention.

FIG. 6 is a diagram for explaining an embodiment of a method of settingan object detection range according to the invention.

FIG. 7 is a flowchart for explaining an embodiment of proceduraloperations in a method of calculating an image reduction coefficientaccording to the invention.

FIG. 8 is a diagram for explaining an embodiment of the method ofcalculating an image reduction coefficient according to the invention.

DESCRIPTION OF THE EMBODIMENTS

An embodiment of an image processing apparatus according to the presentinvention will now be described by making reference to FIG. 1illustrating in block diagram form the construction of an embodiment ofa monitor system using the image processing apparatus of the invention.The monitor system comprises a camera 101 for photographing the insideof a monitor area, a video processing apparatus (image processingapparatus) 102 and a video monitor 115. The image processing apparatus102 includes an image processing interface (image processing I/F) 103for performing conversion to a format that can be processed by the imageprocessing apparatus, an image memory 104 used for inter-image operationor to store (save, record or write) of images, a program memory 110, awork memory 111, a CPU (central processing unit) 112, and an imageoutput interface (image output I/F) 113. Then, the image memory 104includes a background memory 105 for storing (saving, recording orwriting) a background image, an input memory 106 for storing a pluralityof frames of image data inputted from the image input I/F 103, areduction image memory 107 for storing (saving, recording or writing) areduced background image and a reduced input image, a memory forprocessing 108 used for inter-image operation, and a display memory 109.Designated by reference numeral 114 is a data bus that is used for datatransfer between individual components coupled through the data bus 114.

In FIG. 1, the camera 101 photographs the inside of the monitor area andconverts a picked-up image into a video signal which in turn istransmitted to the image processing apparatus 102. The line used fortransmission is, for example, a dedicated network line or cable line andeither or both of a wired line and a wireless line may be used.

In the image processing apparatus 102, the image input I/F 103 receivesa video signal transmitted from the camera 101 and an analog videosignal is subjected to such a process as conversion to a digital signal(A/D conversion) and conversion to a brightness signal of 256 gradationof 0 to 255 grades and is converted into image data of a format that canbe processed by the image processing apparatus. The image data isoutputted to the image memory 104 so as to be stored in the input memory106 inside the image memory 104.

Thus, in the image memory 104, image data inputted from the image inputI/F 103 is stored in the input memory 106.

Following a program stored in the program memory 110, the CPU 112mutually accesses the units coupled through the data bus 114 to controlthe image processing apparatus 102. For example, the CPU 112 performs animage analysis by using the work memory 111 and image memory 104.

The image output I/F 113 converts image data (digital video signal)stored in the display memory 109 inside the image memory 104 into ananalog signal (D/A conversion) and delivers the converted analog videosignal to the video monitor 115.

The video monitor 115 displays the video signal received from the imageoutput I/F 113 on the display screen.

In the embodiment of FIG. 1, the camera 101 is a fixed camera. The fixedcamera referred to herein means a camera in which the depression angle,height and horizontal angle of the camera and the zoom magnification aswell are set to predetermined values when the image pick-up unit such asa camera is installed.

But, in the present embodiment, the use of the fixed camera is notlimitative and another type of camera may be employed in which the panoperation (operation for changing the horizontal angle of camera), tiltoperation (operation for changing the vertical direction (depressionangle)) and zoom magnification or focal distance and, in some case, thecamera height as well can be changed arbitrarily through remote control.

In the case of this type of camera whose picture angle such asview-field angle can be changed, setting values of camera set-upconditions in a flowchart useful to explain the procedural operations inthe object detection method of the invention to be described later canbe changed each time that the picture angle is changed. It is to benoted that the input device used by the user to operate the imageprocessing apparatus 102 (for example, a pointing device such as mouseor keyboard or a dedicated input unit) is not illustrated in FIG. 1. Theuse of this type of input device is a very general practice and soomitted for simplicity of description.

An embodiment of an object detection method according to the presentinvention will now be described with reference to FIGS. 1 to 6.

Illustrated in FIG. 2 is a flowchart for explaining proceduraloperations in the object detection method of the invention and in FIG. 3is a schematic diagram for explaining the principle of the objectdetection method of the invention.

Referring first to FIG. 3, a background image 301 is stored precedentlyin the background memory 105, an input image 302 is inputted from thecamera 101 and stored in the input memory 106, a reduction image 303 ofbackground image 301 is stored in the reduction image memory, areduction image 304 of input image 302 is stored also in the reductionimage memory, and a difference image 305 is obtained by makingsubtraction pixel by pixel between individual brightness values betweenthe reduction input image 304 and reduction background image 303.

Each of the background image 301 and input image 302 has the size interms of the number of pixels amounting to 640 horizontal pixels×480vertical pixels. Each of the reduction images 303 and 304 has the sizein terms of the number of pixels amounting to 320 horizontal pixels×240vertical pixels.

The difference image 305 is represented by an image having, like theinput image, brightness differences of a gradation of 256 grades inrespect of individual pixels but this is difficult to indicate in FIG. 3and is therefore replaced by schematic hatching illustration.

The brightness value of difference image 305 for each pixel isbinary-coded with a predetermined threshold value so that the pixelbrightness value below the threshold may be converted to “0” and thepixel brightness value above the threshold may be converted to “255” (inthe case of 256 gradation of 0 to 255 bits), thus producing a monochromeimage 306 (the brightness value being “0” at double hatched portion andthe brightness value being “255” at the rest).

A noise image area of “255” brightness value in the monochrome image 306is designated at 307 and the noise image area 307 of less than apredetermined pixel size is eliminated from the monochrome image 306 toprovide a noise removed image designated at 308. It should be understoodthat the noise image area 307 is a lump of pixels constituted by one toseveral pixels (predetermined pixel size).

An area of “255” brightness value remaining after the noise eliminationis an image area 309 which is recognized as a detecting object.

The image of “255” brightness value remaining in the noise removed image308 is numbered to provide a labeling image 310 and since, in FIG. 3,one lump of image area 309 out of the two noise image areas 307 and oneimage area 309 remains, the first image area of “255” brightness valueis determined which is allotted with “N1”.

The size of the labeled image is measured to provide an objectrecognition image 311. For example, the labeled recognition image N1 isexpressed for the size of its individual pixels in terms of the numberof pixels and is then stored. The size of the recognized object takesthe form of, for example, a rectangle surrounding the area of theobject, having a size W corresponding to the number of pixels inhorizontal direction and a size H corresponding to the number of pixelsin vertical direction. At that time, in addition to the datarepresentative of the pixel number, positional coordinates of one out offour points of the screen (for example, W₀, H₀) are also stored in thememory.

The size of each image is shown exaggeratedly or depressively in FIG. 3for convenience of explanation only and does not accord absolutely orrelatively with the real image size.

Turning to FIG. 4, an embodiment of a method of setting camera set-upconditions according to the present invention will be described. Thecamera 101 exhibits a depression angle 401, a set-up height 402(distance from horizontal ground or the surface of the earth 404) and aview-field angle 403 in the vertical direction, the horizontal ground404 lying to include the monitor area. In FIG. 4, the camera 101 isillustrated diagrammatically in view form sideward of and parallel tothe ground 404 while being sectioned on its optical axis in the verticaldirection. In FIG. 4 and FIG. 5 as well to be described later, forsimplicity of illustration, other constituents than the camera 101 (forexample, a support such as a pole for mounting and supporting the camera101, a power supply cable and other accessories) are not illustrated.Then, in the view-field of an image to be photographed by the camera101, a horizontal distance from the camera 101 to the nearest locationis represented by L_(N) and a horizontal distance from the camera 101 tothe remotest location is represented by L_(F).

The embodiment of the method of setting the camera set-up conditionsaccording to the invention will further be explained by also makingreference to FIG. 5. The camera is illustrated in side view form in FIG.4 whereas it is illustrated in plan view form from above in FIG. 5. In atrapezoid defined by points P1, P2, P3 and P4, a line segment connectingthe points P1 and P2 shows in plan view form the location correspondingto the horizontal distance L_(N) in FIGS. 4 and 5 and a line segmentconnecting the points P3 and P4 shows also in plan view form thelocation corresponding to the horizontal distance L_(F) in FIGS. 4 and5. The camera 101 exhibits a view-field angle 501 and the earth groundsurface 404 is picked up at a pickup area 500 by means of the camera101. A section on straight line Z corresponds to the illustration ofFIG. 4.

The view-field angle 403 of camera in the vertical direction isdetermined by an aspect ratio (length/breadth ratio) of the camera 101in use. For example, if a device having a ratio of a breadth of 4 to alength of 3 is used, the view-field angle 403 is 75% of the view-fieldangle 501 of camera 101 in the horizontal direction. Then, the zoommagnification is fixed to a given value by which an object to be pickedup that is present between the distances L_(N) and L_(F) contouring thepickup area 500 or is assumed to enter the pickup area can be picked upwithin the focal distance.

An image of monitor area picked up by the camera 101 is displayed on thevideo monitor 115 as exemplified in FIG. 6. An image 600 is displayed onthe display screen of video monitor 115 (display image) and the usersets an object detection range (hatched portion) 601 while watching thedisplay image 600.

Like FIG. 8 to be referred to later, the number of pixels of one screen(one frame) of an image amounts to 640 horizontal (x-coordinate) pixelsand 480 vertical (y-coordinate) pixels. At that time, the positionalcoordinates (x, y) of a pixel at an upper leftmost corner are (0, 0),the positional coordinates of a pixel at an upper rightmost corner are(640, 0), the positional coordinates of a pixel at a lower leftmostcorner are (0, 480) and the positional coordinates of a pixel at a lowerrightmost corner are (640, 480). Then, the origin (0, 0) of positionalcoordinates corresponds to, for example, the pixel at the upper leftmostcorner of the screen.

Referring now to FIG. 2, a procedural operation is first executed inset-up condition setting step 201 in which depression angle 401, height402 and view-field angle 501 in horizontal direction of the camera 101are set as the set-up conditions of the camera 101 through designationby a user or custodian (hereinafter, referred to as the user). But, ifthe camera 101 is a fixed camera as in the case of the FIG. 1embodiment, values set when the camera is installed may be inputted byway of an input unit not shown or the set values may be writtenpreviously in a program for object detection procedure, thus dispensingwith the input operation.

Next, in object detection range setting step 202, a procedure forsetting an object detection range 601 as shown in FIG. 6 is executedthrough designation by the user. The object detection range signifies apartial area of the monitor area within which the object detectionprocedure is carried out.

The object detection range 601 is expressed as a trapezoidal form inthis example but it may be a square or circular form or polygon (forexample such as pentagon, octagon). When designating the range 601 inthe form of a trapezoid, a general method may be adopted according towhich the user designates individual apices defining the objectdetection range. Alternatively, an object detection range composed of aplurality of areas may be employed.

The object detection range setting step 202 can sometimes be omitted.More particularly, when the user does not set an object detection rangeand the program proceeds to the next step, an object detection rangecoincident with the entire screen is set. The object detection rangesetting step 202 may otherwise be deleted from the process program perse. In this case, too, the entire screen is set as an object detectionrange. The entire screen herein means the maximum view-field range thecamera 101 for photographing the inside of the monitor area can pickupand corresponds to the display image 600 in FIG. 6.

Subsequently, in real size setting step 203, a procedure for setting areal size of an object desired to be detected (object subject todetection) is executed through designation by the user. For example,when a grown-up person standing upright is desired to be detected, awidth (W) of 0.5 [m] and a height (H) of 1.7 [m] are set. In this case,an object to be detected is a person, for example, standing upright andthe representative such as a mean value of widths (W) and heights (H) ofgrown-up people assumed to pass through the monitor area are set. Here,the width (W) is a size in horizontal direction on the screen (displayimage 600) and the height (H) is a size in vertical direction on thescreen (display image 600).

Actually, however, minimum/maximum values are calculated automaticallyfor the thus set width (W) and height (H) when detecting an object andtherefore the size to be set can be rough. For example, for width (W)“0.5 [m]” and height (H) “1.7 [m]”, such a predetermined range asdefining width (W) “0.3 to 0.8 [m]” and height (H)“¹ to 2.5 [m]” isdetermined. This predetermined range can be settled by, for example,taking the statistics of widths (W) and heights (H) of grown-up peopleexpected to pass through the monitor area and by obtaining, for example,a dispersion such as a standard deviation of data from a normaldistribution.

Next, in reduction coefficient calculation step 204, a procedure fordetermining a reduction coefficient of an image (to be described later)is executed on the basis of the depression angle 401, height 402,view-field angle 403 in the vertical direction, view-field angle 501 inthe horizontal direction the camera exhibits which are set in the set-upcondition setting step 201 and the object detection range 601 as wellset in the object detection range setting step 202 and besides the width(W) and height (H) of the detecting object set in the real size settingstep 203.

Thereafter, in background image preparing step 205, a procedure isexecuted in which a background image devoid of an object is prepared andthe thus prepared image is stored in the background memory 105, thusproviding a background image 301.

In input image fetching step 206, a procedure is executed in which thelatest image picked up by the camera 101 is fetched and is then storedas an input image 302 in the input memory 106. It will be appreciatedthat the camera 101 picks up and delivers, for example, images of 30frames during 1[s]. But, not all images delivered out of the camera 101are fetched as an input image. For example, one frame out of 60 frames(or one image during 2[s]) or for example, one frame out of 100 framesis fetched and the fetched image is subjected to the image processing.

In image reduction step 207, the background image 301 stored in thebackground memory 105 and the input image 302 stored in the input memory106 are reduced by using an image reduction coefficient obtained in theimage reduction coefficient calculation step 204 to prepare a reducedbackground image (reduction background image) 303 and a reduced inputimage (reduction input image) 304. The thus prepared reductionbackground image 303 and reduction input image 304 are stored in thereduction image memory 107.

In difference step 208, a procedure is executed in which the differenceis calculated pixel by pixel over the entire screen between thereduction background image 301 and the reduction input image 304 bothstored in the reduction image memory 107 to thereby prepare a differenceimage 305.

In binary-coding step 209, a procedure is executed over the entirescreen in which the difference image 305 prepared in the difference step208 is subjected to a threshold value process pixel by pixels to preparea monochrome image 306 according to which a pixel having a differencevalue being less than the threshold is set to a brightness value “0” anda pixel having a difference value being larger than the threshold is setto a brightness value “255” (the brightness value of one pixel isexpressed in 256 gradations of from “0” to “255”), thus preparing themonochrome image 306.

In the monochrome image 306, an area of pixels of brightness value “0”is an area where no object is detected and an area of pixels ofbrightness value “255” (a lump of pixels) is considered as an area wherea detection object exists (as a candidate for an object to be detected).

Next, in noise elimination step 210, a noise elimination process iscarried out. In the noise elimination process, it is decided on thebasis of the size of an area of picked-up pixels whether a detectedobject (a pixel area having a brightness value of 255 in the monochromeimage, that is, a candidate for an object to be detected) is the objectto be detected.

In the monochrome image 306, a lump of pixels of 255 brightness valueconsidered to include a detection object will conceivably contain anobject that need not be detected. For example, even when a person isdesired to be detected, it is conceivable that a small animal such as acat or a falling leaf will be detected. Further, noises generated duringactual image pickup will be involved. Therefore, by executing a processof noise elimination to be described later, an unnecessary pixel lumpmust be eliminated from a candidate for an object to be detected.

More specifically, in the noise elimination step 210, a procedure isexecuted in which a lump of pixels that is outside the range of thenumber of pixels (width and height) corresponding to a real size (forexample, width “0.3 to 0.8 [m]” and height “1 to 2.5 [m]”) of adetecting object set in the real size setting step 203 is eliminatedfrom the monochrome image 306 obtained in the binary-coding process step209, thus preparing a noise removed image 308.

In labeling step 211, a procedure for numbering an object by using thenoise removed image 308 prepared in the noise elimination step 210 isexecuted. More specifically, the procedure is executed such thatindividual lumps of pixels each having the brightness value 255 in theprepared noise removed image 308 are numbered (labeled) so as to bediscriminated from each other. Namely, a procedure for correlating, forexample, “N1” to the individual lumps of pixels as shown at the labelingimage 310 in FIG. 3 is executed (successively, for example, “N2” iscorrelated to a second lump of pixels, “N3” is correlated to a thirdlump of pixels and so on). As a result of labeling, a labeling image 310is prepared.

Through the labeling step 211, an object area 309 acquired in the noiseremoved image 308 is allotted with, for example, an ordinal number “N1”.

In object pursuit step 212, a procedure is executed in which a one-framepreceding object is correlated to an object of present frame to acquirepursuit information of object.

In object recognition step 213, a procedure is executed in which for theobject N1 obtained in the labeling step 211, width (W) and height (H) ofthe object are calculated and on the basis of the calculated width andheight of the object, the object is decided as to whether to be anobject desired to be recognized, thus ensuring that only an objectdesired to be recognized can be extracted.

In object presence/absence deciding step 214, a procedure is executed inwhich the presence/absence of a recognition object is decided by usingthe result of decision in the object recognition process step 213. Ifthe presence of an object is determined, the program proceeds to alarmstep 215.

With the presence of an object determined, it is decided whether a lumpof pixels of the object (for example, object N1) settled as an objectdesired to be recognized in the object recognition processing step 213falls into the object detection range set in the object detection rangesetting step 202. If the object detection range has not been set, theentire screen impersonates an object detection range, so that lumps ofpixels of objects (for example, object N1) settled in the objectrecognition processing step 213 as objects desired to be recognized areall determined as being of the presence of object.

In deciding whether the lump is inside the object detection range, adecision is made as to whether, in the lump of pixels of the objectdetermined as the object desired to be recognized in the objectrecognition processing step 213, a pixel being nearest to the camera 101is present in the object detection range. This is because the detectingobject is assumed to move along the ground (earth ground surface) andbesides, in an image picked up by the camera, the distance from thecamera nears by approaching the lower side of the screen.

In the alarm step 215, the alarm is given to the outside. If the absenceof an object is determined, the program proceeds to background imageupdate step 216.

In the background image update processing step 216, the background imageis updated to obtain an image which in turn is stored in the backgroundmemory 105 and the program returns to the input image fetching step 206to again execute the steps following the input image fetching step 206.

In the alarm step 215, not only the alarm is given but also the image ofthe detected object may be displayed on a different monitor, saved, ortransmitted to a predetermined client, at least one of which may beexecuted. The background image update step 216 may be omitted or may bereplaced by appropriate manual setting by the user. The image of thedetected object to be displayed, saved or transmitted may be an imagebefore or after the reduction or may otherwise be an image of adifferent format.

To add, in the present invention, during the object pursuit step 212,object recognition step 213, alarm step 215 and background image updatestep 216, the conventional general pursuit process may be executed inrespect of a detected object.

Next, details of the reduction coefficient calculation step 204explained in connection with the foregoing embodiments will be describedby making reference to FIGS. 7 and 8 in addition to FIGS. 1 to 6.

A flowchart shown in FIG. 7 is for explaining an embodiment ofprocedural operations in the image reduction coefficient calculationmethod according to the present invention. Illustrated in FIG. 8 is adiagram useful to explain the embodiment of the image reductioncoefficient calculation method of the invention. In FIG. 8, the objectdetection range 601 will be explained by using coordinates. There areillustrated in FIG. 8 a displayed image 600, an object detection range601 set by the user while watching the displayed image 600, leftend/right end points 801 a and 801 c at the remotest position of thedetection range 601 set by the user, and left end/right end points 801 band 801 d at the most frontal position of the detection range 601 set bythe user. Here, the points 801 a and 801 c are defined as the left/rightends because in the absence of a building or the like, the detectionrange is an area surrounded by the points 801 a, 801 b, 801 c and 801 d.The remotest boundary line of object detection range 601 (a virtual lineindicative of the minimum Y of object detection range) is designated atreference numeral 802 and persons are designated at reference numerals803 a, 803 b, 803 c and 803 d. The persons 803 a, 803 b, 803 c and 803 dare sample images arranged to show that the width (W) and height (H) ofa person changes relatively in accordance with positional coordinates onthe screen.

In FIG. 7, it is decided in object detection range decision step 701whether the object detection range 601 is set in the object detectionrange setting step 202. With the presence of the object detection range601 settled, step 702 of calculating minimum/maximum position inside theobject detection range is executed to acquire a minimum X position, amaximum X position, a minimum Y position and a maximum Y position andthen, the program proceeds to object width/height calculation step 704.If the object detection range 601 has not been set, the program proceedsto step 703 of calculating minimum/maximum positions in the entiremonitor area.

The minimum X position corresponds to x coordinates of a pixel at apoint remotest from the camera 101 in the object detection range 601 andthe minimum Y position corresponds to y coordinates of a pixel at apoint remotest from the camera 101 in the object detection range 601.Likewise, the maximum X position corresponds to x coordinates of a pixelat a point nearest to the camera 101 in the object detection range 601and the maximum Y position corresponds to y coordinates of a pixel at apoint nearest to the camera 101 in the object detection range 601.

In the entire monitor area minimum/maximum position calculation step703, the x coordinates of the minimum X position are set to “0”, the xcoordinates of the maximum X position are set to “640” (=image sizeW_(M)), the y coordinates of the minimum Y position is set to “130” andthe y coordinates of the maximum Y position is set to “480” (=image sizeH_(M)). Thereafter, the program proceeds to the object width/heightcalculation step 704.

The reason why minimum X position−maximum X position is made to coincidewith the image size W_(M) is that the detecting object is less affectedby the difference based on a scenograph at a position parallel to theground (earth ground surface) and hence factors for changing thereduction coefficient are a few. Contrarily, the minimum Y position isset not to “0” but to “130” for, in the case of FIG. 8, a remoteboundary (which the ground ends in) of the monitor area (see theboundary 802 in FIG. 6 or 8) corresponds to y coordinated of 130. Inother words, this is because even if the object detection range 601 hasnot been set, a detecting object or an object to be detected does notexist in a remote area beyond the boundary (having y coordinates “130”to “0”) or even if existing in this area, the object cannot be a targetof detection.

In the object width/height calculation step 704, the size of thedetecting object set in the real size setting step 203, for example,represented by a width of 0.5 m and a height of 1.7 m is converted intopixel numbers (the number of pixels) at the points 801 a, 801 b, 801 cand 801 d and the program proceeds to minimum/maximum width/height pointselecting step 705.

For conversion of the width, height, area and the like of an object onan image into values of real coordinates, a general method described inJP-A-7-37063 or JP-A-2005-057743, for example, will be adopted.

In the minimum/maximum width/height point selecting step 705, the widths(pixel numbers) and heights (pixel numbers) at the points 801 a, 801 b,801 c and 801 d which are obtained in the object width/heightcalculation step 704 are decided as to their magnitudes and a pointhaving the minimum width and the minimum height is selected and theprogram proceeds to reduction coefficient calculation step 706.

In the case of the FIG. 8 embodiment, the point 801 a or 801 c isselected. For example, the point 801 a is selected and minimum widthW_(0min) and minimum height H_(0min) are determined.

In the reduction coefficient calculation step 706, reduction coefficientwidth W_(R) and reduction coefficient height H_(R) are calculated byusing the minimum width W_(0min) and minimum height H_(0min) obtained inminimum/maximum width minimum/maximum height calculation step 705.

A coefficient K_(S) used for the reduction coefficient width/heightcalculation step 706 is set in terms of arbitrary number (for example,“1.5”, “2” or the like) and the detectable width W_(D) and height H_(D)are set in terms of pixel number (the number of pixels).

For example, when the minimum with detectable with the image processingapparatus is 10 pixels and the detectable minimum height is 20 pixelsand if the minimum width W_(0min) of an object desired to be detected ata point having the selected minimum width and height is 40 pixels, thereduction coefficient is set to “2”.

In reduction coefficient width/height decision step 707, reductioncoefficient width W_(R) and reduction coefficient height H_(R) obtainedin the reduction coefficient width/height calculation step 706 aredecided as to their magnitudes.

If the reduction coefficient width W_(R) is smaller than the reductioncoefficient height H_(R), the program proceeds to reduction coefficientW determining step 708 and if the reduction coefficient width W_(R) islarger than or equal to the reduction coefficient height H_(R), theprogram proceeds to reduction coefficient H determining step 709.

In the reduction coefficient W determining step 708, reductioncoefficient R is settled as the reduction coefficient width W_(R), thusending the process (with the program caused to proceed to the step 208in FIG. 2).

In the reduction coefficient H determining step 709, the reductioncoefficient R is settled as the reduction coefficient height H_(R), thusending the process (with the program caused to proceed to the step 208in FIG. 2).

In this manner, a smaller reduction coefficient is selected in order tosecure the detection accuracy.

As described above, the present invention provides the method ofcalculating the image reduction coefficient in the invading objectrecognition image processing. According to the aforementionedembodiment, the image reduction coefficient is automatically determinedfrom the parameters such as the set photographing condition, detectionrange and real size of a detecting object. This ensures that the processcan be carried out at a high speed while keeping the detection accuracyintact.

Namely, according to the present embodiment, since the image reductioncoefficient can be set to an appropriate value in accordance with theinstallation environment, the processing can be carried out at a highspeed while keeping the detection accuracy intact.

In the foregoing embodiments, after the differential process between thebackground image and the input image (background difference process) hasbeen executed, the binary-coding process is carried out. But, apart fromthe background difference process, a differential process may beexecuted between input images (inter-frame difference) and thereafter,the binary-coding process may be carried out to perform objectdetection.

In the foregoing embodiments, the view-field angle is set but since theview-field angle can be calculated from the focal distance of lens andthe CCD size of camera, a method for setting the lens focal distance andthe CCD size may alternatively be adopted.

If in the embodiment shown in FIGS. 4 and 5 the distance from camera 101to point P1 equals the distance from camera 101 to point P2 and thedistance from camera 101 to point P3 equals the distance from camera 101to point P4, the parameter in horizontal direction (x coordinates) neednot be taken into consideration in the reduction coefficient calculationstep 204 in FIG. 7. Accordingly, in this case, processing can be omittedin connection with x coordinates.

In addition, the location where the camera 101 can be installed isrestricted depending on the monitor area and the camera set-up cannot beaccomplished under ideal conditions. For example, the earth groundsurface is infrequently horizontal. Further, depending on thetopography, the camera 101 per se needs to be rotated about the centerof its optical axis. Accordingly, although not described in connectionwith FIGS. 4 and 5, the rotation of picture angle of the camera may beconsidered in the FIG. 7 process and the camera 101 per se may berotated about the center of its optical axis in order to pick up theearth ground surface as horizontally as possible.

In the foregoing embodiments, the camera for photographing the monitorarea was a camera for outputting an analog video signal. But, the camerais not limited to this type and a camera for outputting a digital videosignal may be employed. Further, the camera in use is not limited to onein number and two or more cameras may be used and besides a monitorsystem may be employed in which a camera for delivery of an analogsignal and a camera for delivery of a digital signal coexist.

Furthermore, even when the video signal delivered out of the camera is adigital signal, the digital signal is processed in order for it to betransmitted from the camera to the image processing apparatus (videoprocessing apparatus) and therefore, the image input I/F, even ifdispensing with its A/D conversion function, must be provided for theimage processing apparatus in order that the digital signal can beconverted into a format the image processing apparatus can deal with.

It should be further understood by those skilled in the art thatalthough the foregoing description has been made on embodiments of theinvention, the invention is not limited thereto and various changes andmodifications may be made without departing from the spirit of theinvention and the scope of the appended claims.

The invention claimed is:
 1. An image processing apparatus for detectingan input image received from a camera, the camera being adapted tophotograph the inside of a monitor area, and monitoring the inside ofthe monitor area by using an object recognition method, the apparatuscomprising: means for inputting set-up information of the camera, andobject detection range inside the monitor area, and a real size of anobject desired to be detected; means for selecting a point at which thesize of the object desired to be detected is minimized inside the objectdetection range, and for calculating a reduction coefficient from a lumpof pixels of the object at the selected point based on the set-upinformation of the camera, the object detection range inside the monitorarea, and the real size of the object desired to be detected; means forstoring an image of the monitor area viewed from the camera as abackground image; means for storing an actual image viewed from thecamera as the input image; means for inputting said input image and saidbackground image and for reducing both of said input image and saidbackground image using said reduction coefficient to prepare a reducedinput image and a reduced background image, respectively; means forperforming a differential process between said reduced input image andsaid reduced background image to prepare a difference image, wherein thebackground image is eliminated from the difference image; means forbinary-coding the difference image to prepare a monochrome imagecomposed of a minimum brightness and maximum brightness, based on apredetermined threshold; means for generating a noise eliminated imagebe eliminating the lump of pixels as a noise region from the monochromeimage; wherein the noise region is not included in the number of pixelscorresponding to the real size of the object desired to be detected; andmeans for recognizing the object from said noise eliminated image. 2.The image processing apparatus according to claim 1, wherein when saidbinary coded monochrome image is composed only of the minimumbrightness, then the background image is updated by replacing with theinput image as the object not being detected.